<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <meta charset="UTF-8">
    <title>方法</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<h3 th:text="${#strings.toUpperCase(content)}">原内容</h3>


<h3 th:text="${'开头'+content+'结尾'}">默认内容</h3>
<h3 th:text="|开头2 ${content} 结尾2|">默认内容</h3>


<table class="table">
    <tbody>
        <tr th:each="prod : ${personList}">
            <td th:text="${prod.id}">0</td>
            <td th:text="${prod.userName}">默认名称</td>
            <td th:text="${prod.email}">xxx@163.com</td>
            <td>[[${prod.age}]]</td>
            <td th:text="${prod.role}">none</td>
        </tr>
    </tbody>
</table>

<table class="table">
    <tbody>
    <tr th:each="prod,thisProd: ${personList}">
        <td th:text="${prod.id}">0</td>
        <td th:text="${prod.userName}">默认名称</td>
        <td th:if="!${#strings.isEmpty(prod.email)}" th:text="${prod.email}">xxx@qq.com</td>
        <td th:if="${#strings.isEmpty(prod.email)}">暂无</td>
        <td th:text="${prod.age >= 18 ? '成年' : '未成年'}">10</td>
        <td th:text="${prod.role}">none</td>
        <td th:switch="${prod.role}">
            <p th:case="'pm'">员工</p>
            <p th:case="'admin'">管理员</p>
            <p th:case="*">其他职位</p>
        </td>
        <td>
            索引（从0开始）: [[${thisProd.index}]]
            索引（从1开始）: [[${thisProd.count}]]
            是否第一个元素: [[${thisProd.first}]]
            是否最后一个元素: [[${thisProd.last}]]
            需要遍历元素的总数量: [[${thisProd.size}]]
            当前正在遍历的元素对象: [[${thisProd.current}]]
            是否偶数行: [[${thisProd.even}]]
            是否奇数行: [[${thisProd.odd}]]
        </td>
    </tr>
    </tbody>
</table>



</body>
</html>